import java.lang.reflect.*;
public class P1Test
{
	public static void main(String args[]) throws Exception
	{
		P1 p = new P1();
		Class<?> classType = p.getClass();
		Method method = classType.getDeclaredMethod("sayHello", new Class[]{String.class});
		method.setAccessible(true);
		String str = (String) method.invoke(p, new Object[]{"Tom"});
		System.out.println(str);
	}
}